How to replace a Substring in a String

BigQuery provides the following string replacement function:

WITH schedules AS
  (SELECT 'Marlins' as homeTeamName, 'Cubs' as awayTeamName UNION ALL
   SELECT 'Braves', 'Cubs' UNION ALL
   SELECT 'Phillies', 'Braves' 
  )
SELECT homeTeamName,
       replace(homeTeamName,'es','ES') AS replace 
FROM schedules
homeTeamName Replace
marlin marlin
braves bravES
Phillies PhilliES

IN THIS PAGE